<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::get('test1','MemberController@test1');
Route::get('query1','MemberController@query1');
Route::get('query2','MemberController@query2');
Route::get('query_chunk','MemberController@query_chunk');
Route::get('orm1','StudentController@orm1');
Route::get('orm2','StudentController@orm2');
Route::get('orm3','StudentController@orm3');
Route::get('orm4','StudentController@orm4');
Route::get('request1','StudentController@request1');
Route::middleware('web')->group(function(){
    Route::any('session1','StudentController@session1');
    Route::any('session2','StudentController@session2')->name('session2');
});
Route::get('response','StudentController@response');


Route::any('activity0','StudentController@activity0')->name('activity0');
Route::middleware('activity')->group(function(){
    Route::any('activity1','StudentController@activity1')->name('activity1');
    Route::any('activity2','StudentController@activity2')->name('activity2');
});

Route::middleware('web')->group(function(){
    Route::resource('student','StudentController');
    Route::any('delete{student}','StudentController@delete')->name('student.delete');
    Route::any('upload','StudentController@upload')->name('student.upload');
    Route::any('mail','StudentController@mail')->name('mail');
    Route::any('cache1','StudentController@cache1')->name('cache1');
    Route::any('cache2','StudentController@cache2')->name('cache2');
});


//Route::get('student','StudentController@index');

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');


Route::any('/login1',function(){
    return 1;
})->middleware('auth.basic');